package com.ihunanren.biz.function.service.impl;

import static com.google.common.base.Strings.isNullOrEmpty;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;

import com.google.common.base.Throwables;
import com.ihunanren.biz.common.HnrResourceLoader;
import com.ihunanren.biz.function.domain.More;
import com.ihunanren.biz.function.service.IWeixinService;

/**
 * 查看更多的命令集合
 * 
 * @author kalman03
 * 
 */
public class MoreService implements IWeixinService<More> {

	@Override
	public List<More> getResponse(String input) {
		if (isNullOrEmpty(input) || !input.equalsIgnoreCase("m"))
			return null;

		try {
			String str = HnrResourceLoader.getResoureceAsString("wx_more_commond.dat");
			return Arrays.asList(new More(str));
		} catch (IOException e) {
			Throwables.propagate(e);
		}
		return null;
	}
}
